package com.ychs.lawyer.exception;

import com.ychs.lawyer.bean.ResultCode;
import lombok.Data;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: clh
 * @Date: 2024/07/18/15:45
 * @Description:自定义一个异常
 */
@Data
public class BussinessException extends RuntimeException{
    private Integer code;
//    枚举类型
    public BussinessException(ResultCode resultCode) {
        super(resultCode.getMsg());
        this.code = resultCode.getCode();
    }
}
